package com.utonw.carloan.fragment.applyloan;

import android.content.Intent;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.TextView;

import com.sensetime.library.finance.ocr.card.IdCardInfo;
import com.utonw.carloan.R;
import com.utonw.carloan.fragment.BaseFragment;
import com.utonw.carloan.function.GlobalLoanFunction;
import com.utonw.carloan.utils.ChooseBarUtils;

import java.util.ArrayList;

/**
 * Created by SEELE on 2017/3/22.
 */

/**
 * 申请贷款流程8：互联网
 */
public class LoanStepEightFragment extends BaseFragment {


    @Override
    public int setLayout() {
        return R.layout.fragment_applyloan_step_eight;
    }

    @Override
    public void initView(View view) {

    }

    @Override
    public void initData() {
        //初始化PickerView选择器
        final GlobalLoanFunction globalLoanFunction = new GlobalLoanFunction();
        //设置ChooseBar标题
        ChooseBarUtils titleUtils = new ChooseBarUtils(getHoldingActivity()) {
            @Override
            protected void setChooseBarClickListener(int view) {

            }

            @Override
            protected void setChooseBarClickListener(int view, TextView toShow) {
                switch (view) {
                    case R.id.dsxx_dianshang:

                        final ArrayList<String> data1 = new ArrayList<>();
                        data1.add("淘宝");
                        data1.add("京东");
                        globalLoanFunction.setTempData(data1, toShow).oriPickerView(getContext());

                        break;
                }
            }

            @Override
            protected void getCheckedViewListener(int includeId, int sTitle, View toCheck) {

            }

            @Override
            public void onToggleButtonListener(int buttonView, boolean isChecked) {

            }

            @Override
            public void getEditTextWithTipsListener(int includeId, EditText tempEt1) {

            }

            @Override
            public void onRadioButtonListener(RadioButton rMale, RadioButton rFemale) {

            }

            @Override
            public void onImageChooseBarListener(int view, ImageView mIndicator, TextView mInstruction, int sTitle) {

            }

            @Override
            public void getChangeWordsEditTextListener(int includeId, EditText tempEt1, int sTitle) {

            }

            @Override
            public void setVerificationListener() {

            }
        };
        titleUtils.initChooseBar("0","0","electronicType",R.id.dsxx_dianshang, R.string.apply_page_eight_EB);
        titleUtils.initChooseBar("0","0","electronicAccount",R.id.dsxx_zhanghao, R.string.apply_page_eight_id, ChooseBarUtils.ResultState.CHANGE_WORDS, "请输入");
        titleUtils.initChooseBar("0","0","electronicPassword",R.id.dsxx_denglumima, R.string.apply_page_eight_pwd, ChooseBarUtils.ResultState.CHANGE_WORDS, "请输入");
        titleUtils.initChooseBar("0","0","alipayAccoount",R.id.zfbxx_zhanghao, R.string.apply_page_eight_id, ChooseBarUtils.ResultState.CHANGE_WORDS, "请输入");
        titleUtils.initChooseBar("0","0","alipayPassword",R.id.zfbxx_denglumima, R.string.apply_page_eight_pwd, ChooseBarUtils.ResultState.CHANGE_WORDS, "请输入");
        titleUtils.initChooseBar("0","0","socialSecurityAccount",R.id.sbxx_zhanghao, R.string.apply_page_eight_id, ChooseBarUtils.ResultState.CHANGE_WORDS, "请输入");
        titleUtils.initChooseBar("0","0","socialSecurityPassword",R.id.sbxx_denglumima, R.string.apply_page_eight_pwd, ChooseBarUtils.ResultState.CHANGE_WORDS, "请输入");
        titleUtils.initChooseBar("0","0","houseFundAccount",R.id.gjjxx_zhanghao, R.string.apply_page_eight_id, ChooseBarUtils.ResultState.CHANGE_WORDS, "请输入");
        titleUtils.initChooseBar("0","0","houseFundPassword",R.id.gjjxx_denglumima, R.string.apply_page_eight_pwd, ChooseBarUtils.ResultState.CHANGE_WORDS, "请输入");
        titleUtils.initChooseBar("0","0","emailAccount",R.id.yxxx_zhanghao, R.string.apply_page_eight_id, ChooseBarUtils.ResultState.CHANGE_WORDS, "请输入");
        titleUtils.initChooseBar("0","0","emailPassword",R.id.yxxx_denglumima, R.string.apply_page_eight_pwd, ChooseBarUtils.ResultState.CHANGE_WORDS, "请输入");
        titleUtils.initChooseBar("0","0","learnNetworkAccount",R.id.xlxx_zhanghao, R.string.apply_page_eight_xuexinwang, ChooseBarUtils.ResultState.CHANGE_WORDS, "请输入");
        titleUtils.initChooseBar("0","0","learnNetworkPassword",R.id.xlxx_denglumima, R.string.apply_page_eight_pwd, ChooseBarUtils.ResultState.CHANGE_WORDS, "请输入");

    }

    @Override
    protected void getIdcardFrontInfo(IdCardInfo idCardInfo) {

    }

    @Override
    protected void getIdcardBackInfo(IdCardInfo idCardInfo) {

    }

    @Override
    protected void getBankcardInfo(Intent cardData) {

    }

    @Override
    protected void getCreditcardInfo(Intent cardData) {

    }
}
